package com.bianguo.android.apushdemo.presenter.impl;

import com.bianguo.android.apushdemo.entity.MovieEntity;
import com.bianguo.android.apushdemo.model.impl.LoginModel;
import com.bianguo.android.apushdemo.view.ILoginView;

import rx.Subscriber;

/**
 * Created by Administrator on 2017/8/14.
 */

public class LoginPresenter extends BasePresenter<ILoginView> {

    private LoginModel loginModel;

    public LoginPresenter() {
        loginModel = new LoginModel();
    }

    public void login() {
        loginModel.login(new Subscriber<MovieEntity>() {
            @Override
            public void onCompleted() {

            }

            @Override
            public void onError(Throwable e) {

            }

            @Override
            public void onNext(MovieEntity s) {
                mView.showLoginView();
            }
        });
    }
}
